home *** CD-ROM | disk | FTP | other *** search
/ InterCD 1999 July / july_1999.iso / Site Building / XML Spy / xmlspy25.exe / Main / gra_xml.txt < prev    next >
Encoding:
Text File  |  1999-06-27  |  8.4 KB  |  96 lines

  1. document        ::=    prolog element misc*                                                >XML Document
  2. prolog            ::=    xmlDecl? misc* (doctypedecl misc*)?                                    >Document Prolog (XML Declaration + Document Type)
  3. xmlDecl$        ::=    '<?xml' versionInfo encodingDecl? sdDecl?  S? '?>'                    >XML Declaration (<?xml...?>)
  4. versionInfo$    ::= S 'version' Eq ( ( '"' VersionNum '"' ) | ( "'" VersionNum "'" ) )    >Version Info (version="1.0")
  5. VersionNum        ::= ([a-zA-Z0-9_.:] | '-')+                                                >Version Number (1.0)
  6. encodingDecl$    ::= S 'encoding' Eq ( ( '"' EncName '"' ) | ( "'" EncName "'" ) )        >Encoding Declaration (encoding="...")
  7. EncName            ::= [A-Za-z] ([A-Za-z0-9._] | '-')*                                        >Encoding Name (UTF-8, ISO-8859-1, etc)
  8. sdDecl$            ::= S 'standalone' Eq (("'" SDValue "'") | ('"' SDValue '"'))            >Standalone Declaration (standalone="...")
  9. SDValue            ::= 'yes' | 'no'                                                        >'yes' or 'no'
  10. misc            ::=    comment | pi | S                                                    >Comment, Processing Instruction, or Whitespace
  11. doctypedecl$    ::=    '<!DOCTYPE' S DocTypeName (S externalID)? S? ('[' dtdText? ']' S?)? '>'    >Document Type Declaration (<!DOCTYPE...>)
  12. dtdText            ::= (markupdecl | DocTypeText | S)+                                        >Markup Declaration or Parameter-entity Reference
  13. DocTypeName        ::= Name                                                                >Document Type Name
  14. DocTypeText        ::= PEReference+                                                        >Parameter-entity Reference
  15. markupdecl        ::=    elementdecl | attlistDecl | entityDecl | notationDecl | pi | comment    >Declaration for Element, Attribute List, Entity, or Notation
  16. element            ::= emptyElemTag | realElemTag                                            >Element (<Element>...)
  17. realElemTag$    ::= sTag content eTag { ElementName = ElementNameEnd }                    >Element (<Element>...)
  18. sTag            ::=    '<' ElementName (S attribute)* S? '>'                                >Element Start Tag (<Element>)
  19. attribute$        ::=    AttName Eq attQValue                                                >Attribute (attribute="value")
  20. Eq!                ::=    S? '=' S?                                                            >Equal sign ('=')
  21. eTag            ::= '</' ElementNameEnd S? '>'                                            >Element End Tag (</Element>)
  22. content$        ::=    ( element | cdSect | pi | comment | TextData | S? )*                >Element Content (Element | CData | Processing Instruction | Comment | Text Data | Whitespace)
  23. TextData        ::= S* ( CharNoWhite | Reference ) ( CharData | Reference )*            >Text Data
  24. emptyElemTag$    ::= '<' ElementName (S attribute)* S? '/>'                                >Empty Element (<Element/>)
  25. ElementName        ::= Name                                                                >Element Name
  26. ElementNameEnd    ::= Name                                                                >closing element name
  27. elementdecl$    ::= '<!ELEMENT' S ElementDeclName S ContentSpec S? '>'                    >Element Declaration (<!ELEMENT...>)
  28. ElementDeclName    ::= NameOrPERef                                                            >Element Name
  29. ContentSpec        ::= 'EMPTY' | 'ANY' | Mixed | children | PEReference                    >Element Content Specification ('EMPTY' | 'ANY' | Mixed | Children | PEReference)
  30. children        ::= (choice | seq) ('?' | '*' | '+')?                                    >Children (Choice | Sequence)
  31. choice            ::= '(' S? cp ( S? '|' S? cp )* S? ')'                                    >Choice ( a | b | c )
  32. cp                ::= ( NameOrPERef | choice | seq) ('?' | '*' | '+')?                    >Name, PEReference, Choice, or Sequence
  33. seq                ::= '(' S? cp ( S? ',' S? cp )* S? ')'                                    >Sequence ( a , b , c )
  34. Mixed            ::=    ('(' S? '#PCDATA' (S? '|' S? NameOrPERef)* S? ')*') | ('(' S? '#PCDATA' S? ')')    >Mixed (#PCDATA | Name | PEReference)
  35. attlistDecl$    ::=    '<!ATTLIST' S AttlistName (S AttlistText)? S? '>'                    >Attribute List Declaration (<!ATTLIST...>)
  36. AttlistName        ::= NameOrPERef                                                            >Attribute List Name
  37. AttlistText        ::= AttDef (S AttDef)*                                                    >Attribute Definitions
  38. AttDef            ::= ( ( Name S AttType S DefaultDecl ) | PEReference )                    >Attribute Definition (Name Attribute-Type Default-Declaration)
  39. AttType            ::= StringType | TokenizedType | EnumeratedType                            >Attribute-Type (String-Type | Tokenized-Type | Enumerated-Type)
  40. StringType        ::= 'CDATA'                                                                >String-Type (CDATA)
  41. TokenizedType    ::= 'IDREFS' | 'IDREF' | 'ID' | 'ENTITY' | 'ENTITIES' | 'NMTOKENS' | 'NMTOKEN' | PEReference >Tokenized-Type (IDREFS | IDREF | ID | ENTITY | ENTITIES | NMTOKEN | NMTOKENS | PEReference)
  42. EnumeratedType    ::= NotationType | Enumeration                                            >Enumerated-Type (Notation-Type | Enumeration)
  43. NotationType    ::= 'NOTATION' S '(' S? Name (S? '|' S? Name)* S? ')'                    >Notation-Type ( NOTATION '(' Name | Name | ... ')' )
  44. Enumeration        ::= '(' S? Nmtoken (S? '|' S? Nmtoken)* S? ')'                            >Enumeration ( '(' Nmtoken | Nmtoken | ... ')' )
  45. DefaultDecl        ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? attQValue)                >Default-Declaration (#REQUIRED | #IMPLIED | #FIXED "value")
  46. Reference        ::= EntityRef | CharRef                                                    >Reference (Entity-Reference | Character-Reference)
  47. CharRef            ::= ('&#' [0-9]+ ';') | ('&#x' [0-9a-fA-F]+ ';')                        >Character-Reference (Ù or ê)
  48. EntityRef        ::= '&' Name ';'                                                        >Entity-Reference (&Entity;)
  49. NameOrPERef        ::= Name | PEReference                                                    >Name or Parameter-entity Reference (%PE;)
  50. PEReference        ::= '%' Name ';'                                                        >Parameter-entity Reference (%PE;)
  51. entityDecl        ::= geDecl | peDecl                                                        >Entity Declaration (<!ENTITY...>)
  52. geDecl$            ::= '<!ENTITY' S GEName S GEDef S? '>'                                    >Entity Declaration (<!ENTITY...>)
  53. peDecl$            ::= '<!ENTITY' S PEName S PEDef S? '>'                                    >Entity Declaration (<!ENTITY...>)
  54. GEName            ::= Name                                                                >Entity Name
  55. PEName            ::= '%' S Name                                                            >Parameter-entity Name
  56. GEDef            ::= EntityValue | (externalID NDataDecl?)                                >Entity Definition (Entity-Value | External-ID NData-Declaration)
  57. PEDef            ::= EntityValue | externalID                                            >Parameter-entity Definition (Entity-Value | External-ID)
  58. externalID$        ::= (ExtIDNameSys S ExtIDTextSys) | (ExtIDNamePub S ExtIDTextPub)        >External-ID ('SYSTEM' System-Literal | 'PUBLIC' Pubid-Literal System-Literal)
  59. ExtIDNameSys    ::= 'SYSTEM'                                                            >'SYSTEM'
  60. ExtIDTextSys    ::= SystemLiteral                                                        >System-Literal
  61. ExtIDNamePub    ::= 'PUBLIC'                                                            >'PUBLIC'
  62. ExtIDTextPub    ::= PubidLiteral S SystemLiteral                                        >Pubid-Literal System-Literal
  63. NDataDecl        ::= S 'NDATA' S Name                                                    >NData-Declaration ('NDATA' Name)
  64. notationDecl$    ::= '<!NOTATION' S NotationName S NotationText S? '>'                    >Notation-Declaration (<!NOTATION...>)
  65. NotationName    ::= NameOrPERef                                                            >Notation Name
  66. NotationText    ::= externalID | PublicID                                                >Extermal-ID or Public-ID
  67. PublicID        ::= 'PUBLIC' S PubidLiteral                                                >Public-ID ('PUBLIC' Pubid-Literal)
  68. S!                ::=    (#x20 | #x09 | #x0D | #x0A)+                                        >Whitespace (Blank, Tab, CR, LF)
  69. AttName            ::=    Name                                                                >Attribute Name
  70. Name            ::= (Letter | '_' | ':') (NameChar)*                                    >Name ( (Letter | '_' | ':') (Name-Character)* )
  71. NameChar        ::= Letter | Digit | '.' | '-' | '_' | ':'                                >Name-Character (Letter | Digit | '.' | '-' | '_' | ':')
  72. Nmtoken            ::= NameChar+                                                            >Nmtoken (Name-Character+)
  73. EntityValue        ::= ('"' ([^%&"] | PEReference | Reference)* '"') | ("'" ([^%&'] | PEReference | Reference)* "'") >Quoted Entity-Value
  74. attQValue        ::=    ('"' AttValue1 '"') | ("'" AttValue2 "'")                            >Quoted Attribute Value ("value" | 'value')
  75. AttValue1        ::= ([^<&"] | Reference)*                                                >Attribute Value
  76. AttValue2        ::= ([^<&'] | Reference)*                                                >Attribute Value
  77. SystemLiteral    ::= ('"' [^"]* '"') | ("'" [^']* "'")                                    >System Literal
  78. PubidLiteral    ::= ('"' PubidChar* '"') | ("'" (PubidCharNoQu)* "'")                    >Pubid Literal
  79. PubidChar!        ::= #x20 | #x0D | #x0A | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]            >Pubid Character
  80. PubidCharNoQu!    ::= #x20 | #x0D | #x0A | [a-zA-Z0-9] | [-()+,./:=?;!*#@$_%]                >Pubid Character (no quotes)
  81. CharData        ::=    [^<&]* / ']]>'                                                        >Character Data
  82. CharNoWhite!    ::=    [^< #x09#x0D#x0A]                                                >Character (may not contain Whitespaces)
  83. comment            ::=    '<!--' CommentText '-->'                                            >Comment (<!-- Text -->)
  84. CommentText        ::= (CharNoDash | ('-' CharNoDash))*                                    >Comment Text (may not contain '--')
  85. CharNoDash!        ::=    #x09 | #x0A | #x0D | [#x20-#x2C] | [#x2E-#xFF]                        >Character (no dash)
  86. pi$                ::= '<?' PITarget (S PIData)? '?>'                                        >Processing Instruction (<?pi...?>)
  87. PITarget        ::= Name - 'xml'                                                        >Processing Instruction Name (may not be 'xml')
  88. PIData            ::=    Char* / '?>'                                                        >Processing Instruction Data
  89. Char!            ::=    #x09 | #x0A | #x0D | [#x20-#xFF]                                    >Character
  90. cdSect            ::=    CDStart CData? CDEnd                                                >CData Section (<![CDATA[...]]>)
  91. CDStart!        ::=    '<![CDATA['                                                            >'<!CDATA['
  92. CData            ::=    Char* / ']]>'                                                        >Character Data
  93. CDEnd!            ::=    ']]>'                                                                >']]>'
  94. Digit!            ::=    [#x30-#x39]                                                            >Digit ([0-9])
  95. Letter!            ::=    [#x41-#x5A] | [#x61-#x7A] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#xFF]    >Letter ([a-zA-Z], etc)
  96.